package com.flextribe.util
{
	public dynamic class DayLightDate extends Object
	{
		private var _date:Date;
		
		public function DayLightDate(yearOrTimevalue:Object, ...rest):void{
			
			
			var month:Number = rest.length > 0 ? rest[0] : 0;
			var date:Number = rest.length > 1 ? rest[1] : 1;
			var hour:Number = rest.length > 2 ? rest[2] : 0;
			var minute:Number = rest.length > 3 ? rest[3] : 0;
			var second:Number = rest.length > 4 ? rest[4] : 0;
			var millisecond:Number = rest.length > 5 ? rest[5] : 0;
			
			if(yearOrTimevalue is Date){
				_date = new Date((yearOrTimevalue as Date).time);
			} else {
				_date = new Date(yearOrTimevalue, month, date, hour, minute, second, millisecond);
			}
		}
		protected function isDST(date:Date):Boolean{
			return (date.getTimezoneOffset() < new Date(2000, 0, 1).getTimezoneOffset());
			//date.setUTCHours( date.getUTCHours() + timezoneOffset + ( blnIsDST && daylightSaving ? 1 : 0 ) );
		}
		public function toLocaleString():String{
			return _date.toLocaleString();
		}
		public function toString():String{
			return _date.toString();
		}
		protected function updateProperties():void{
			
		}
	}
}